import requests

url = 'https://httpbin.org/post'
data = {
    'name': 'tynam',
    'password': '123456'
}

response = requests.post(url=url,json=data)
print(response.text)

# {
#   "args": {},
#   "data": "{\"name\": \"tynam\", \"password\": \"123456\"}",
#   "files": {},
#   "form": {},
#   "headers": {
#     "Accept": "*/*",
#     "Accept-Encoding": "gzip, deflate",
#     "Content-Length": "39",
#     "Content-Type": "application/json",
#     "Host": "httpbin.org",
#     "User-Agent": "python-requests/2.32.3",
#     "X-Amzn-Trace-Id": "Root=1-6841597e-071912e223ebad5e43b09440"
#   },
#   "json": {
#     "name": "tynam",
#     "password": "123456"
#   },
#   "origin": "116.24.222.235",
#   "url": "https://httpbin.org/post"
# }